<template>
    <div id="popup" v-show="visible">

        <div class="popup-container">
            <div class="popup-container-message">
                <big>标题</big>
                <p>{{popup}}</p>
                <div class="popup-button">
                    <button @click="onConfirm">取消</button>
                    <button @click="onConfirm" class="button">确认</button>
                </div>
            </div>
        </div>
        
    </div>
</template>

<script>
export default {
    data() {
        return {
            popup:"",
            visible:false
        }
    },
    methods: {
        onConfirm(){
            this.visible = false;
        }
    },
}
</script>

<style lang="scss">
#popup{
    width:100vw;
    height:100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: rgba(0,0,0,0.4);
    z-index: 999;
    .popup-container{
        width: 100%;
        height: 100%;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        .popup-container-message{
            width:85vw;
            padding:20px 10px;
            text-align: center;
            border-radius: 10px;
            // background-color: rgba(230,230,230,0.7);
            background-color: #fff;
            .popup-button{
                width:100%;
                // border:1px solid red;
                button{
                    width:50%;
                    // margin:0 2px;
                    // border-radius: 30px;
                    padding:8px;
                    background-color: #fff;
                    border:none;
                }
                .button{
                    color: red;
                    // color:#fff;
                    // background-color: #F9402E;
                    // border:1px solid #F9402E;
                    border-left: 1px solid lightgray;
                }
            }
            p{
                width:100%;
            }
        }
    }
} 
</style>